package com.sneaker.shower.entity.enums;

import java.math.BigDecimal;
import java.util.Arrays;

public enum ShoesSubServiceEnum {
    ;
    private ShoesServiceEnum master;
    private ShoesSubServiceEnum parent;

    private String message;

    private Byte code;

    private BigDecimal price;

    ShoesSubServiceEnum(ShoesServiceEnum master, ShoesSubServiceEnum parent, String message, Byte code, BigDecimal price) {
        this.master = master;
        this.parent = parent;
        this.message = message;
        this.code = code;
        this.price = price;
    }

    public static ShoesSubServiceEnum getByCode(Byte code) {
        return Arrays.stream(values()).filter((e) -> e.getCode().equals(code)).findFirst().orElse(null);
    }

    public ShoesServiceEnum getMaster() {
        return master;
    }

    public ShoesSubServiceEnum getParent() {
        return parent;
    }

    public String getMessage() {
        return message;
    }

    public Byte getCode() {
        return code;
    }
}
